﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using VehicleManagement.Codes;
using VehicleManagement.Models;

namespace VehicleManagement.ControllersServices
{
    public class AdminServices
    {

        /// <summary>
        /// 获取管理员信息
        /// </summary>
        /// <param name="id">管理员ID</param>
        /// <returns>管理员信息对象</returns>
        public AdminInfo GetAdminInfo(int id)
        {
            IList<AdminInfo> lstModel = SqlMapperManager.Instance.Get().QueryForList<AdminInfo>("SELECT_ADMININFO_BY_ID", id);
            AdminInfo adminInfo = lstModel.Where(u => u.AdminID == id).First();
            return adminInfo;
        }
    }
}